using System;
using System.Data;
using System.Text;

using Wicresoft.Common;
using Wicresoft.Busi.Entity;

namespace Wicresoft.Busi.BizLogic
{
    /// <summary>
    /// Summary description for BLVehicleGroups.
    /// </summary>
    public class BLVehicleGroups
    {
        public BLVehicleGroups()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public static bool DelVehicleGroups(int VehicleID)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(VehicleGroups.SQLCOL_VEHICLEID + " = " + VehicleID);
            return DataAccess.Delete(typeof(VehicleGroups), sb.ToString());
        }

        public static DataTable GetVehicleGroups(int VehicleID)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(VehicleGroups.SQLCOL_VEHICLEID + " = " + VehicleID);
            return DataAccess.Select(typeof(VehicleGroups), sb.ToString(), VehicleGroups.SQLCOL_ID);
        }

        public static DataTable GetVehicleGroups(Guid GroupID)
        {
            return DataAccess.Select(typeof(VehicleGroups), Entity.VehicleGroups.SQLCOL_GROUPID + " = '" + GroupID + "'", string.Empty);
        }
    }
}
